<template>
  <!-- No changes to template section -->
</template>

<script>
export default {
  // No changes to component options
}
</script>

<style>
  /* No changes to style section */
</style>

<script>
export default {
  methods: {
    closeSelectedTag(view) {
      if (this.visitedViews.length === 1) {
        this.$modal.msgWarning("当前为最后一个页签，不允许删除。")
        return
      }
      this.$store.dispatch('tagsView/delView', view).then(({ visitedViews }) => {
        if (this.isActive(view)) {
          this.toLastView(visitedViews, view)
        }
      })
    },
  }
}
</script> 